<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <style>
      .father {
        width: 500px;
        height: 300px;
        border: 1px solid #0a3b98;
        position: relative;
      }
      .son {
        width: 100px;
        height: 40px;
        background: #f0a238;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
      }
    </style>
    <div class="father">
      <div class="son"></div>
    </div> -->
    <style>
      .father {
        /* position: relative; */
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 200px;
        background: skyblue;
      }
      .son {
        /* position: absolute; */
        /* top: 50%;
        left: 50%; */
        /* margin-left: -50px;
        margin-top: -50px; */
        /* top: calc(50% - 100px / 2);
        left: calc(50% - 100px / 2); */
        /* right: 0;
        bottom: 0; */
        /* margin: auto; */
        width: 100px;
        height: 100px;
        background: red;
        display: flex;
        justify-content: center;
        align-items: center;
      }
      img {
        width: 50px;
        height: 50px;
      }
    </style>
    <div class="father">
      <div class="son"><span>5555</span><img src="./麦田.jpg" alt="" /></div>
    </div>
    <!-- 多行居中 -->
    <!-- <style>
      .father {
        display: table-cell;
        width: 500px;
        height: 500px;
        padding: 100px;
        box-sizing: border-box;
        background: skyblue;
        /* line-height: 500px; */
        vertical-align: middle;
        text-align: center;
      }
    </style>
    <div class="father">
        降低成本但vVV VV VV VV VV VV VV VV VV VV VV VV VV VV VVV雕发的隔壁嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎嘎滚滚滚
    </div> -->
  </body>
</html>
